import http from '../util/request.js'

export default{
    captcha:()=>{
        return http({
            url:'/api/login/captcha',
            method:'get'
        });
    },
    login:(obj)=>{
        return http({
            url:'/api/login/dologin',
            method:'post',
            //表单参数
            params:obj
        });
    },
    logininfo:()=>{
        return http({
            url:'/api/login/logininfo',
            method:'get'
        });
    },
    add:(obj)=>{
        return http({
            url:'/api/login/register',
            method:'post',
            data:obj,
            headers: {
                //定义将数据以json的形式传入后台(java)
                'Content-Type': 'application/json'
            }
        })
    },
    changePassword:(obj )=>{
        return http({
            url: '/api/login/changePassword',
            method: 'post',
            data: obj,
            headers: {
                //定义将数据以json的形式传入后台(java)
                'Content-Type': 'application/json'
            }
        });
    },
}